package com.neusoft.demo9;

public class ExceptionDemo1 {
    public static void main(String[] args) {
        int[] array = {1,2,3,4,5,6};
        try {
            //有可能产生异常的代码
            for (int i = 0; i <= array.length; i++) {
                System.out.println(array[i]);
            }
        } catch (Exception e) {
            System.out.println("数组下标越界！！！");
        }finally {
            System.out.println("关闭资源");
        }
        System.out.println("11111111111111111111111111");
    }
}
